<div id="information">
<br />
<?php
if($_GET['check']=="check"){
?>
<h3 class="form_h3">Вие избрахте да добавите урок към: <?php echo $_GET['name']; ?></h3>
<hr width="90%"/>
<form method="post" action="<?php echo 'addarticle.php?name='.$_GET['name'].'&amp;check='.check.''; ?>" class="form">
   <h3 class="form_h3">Име на статията</h3>
   <input type="text" name="article_name" value="<?php echo $_POST['article_name']; ?>" />
   <h3 class="form_h3">Описание на статията</h3>
   <textarea cols="50" rows="5" name="descr"><?php echo $_POST['descr']; ?></textarea><br /><br />
   <h3 class="form_h3">Статия</h3>
   <textarea cols="50" rows="5" name="article" style="height: 150px;"><?php echo $_POST['article']; ?></textarea><br />
   <h3 class="form_h3">Раздел</h3>
   <select name="module">
      <?php
		 //Select the modules from the tutorial
	     $sel_m = mysql_query('SELECT name FROM modules WHERE to_tutorial = "'.$_GET['name'].'"');
		 while($row_m = mysql_fetch_assoc($sel_m)){
		 ?>
		    <option value="<?php echo $row_m['name']; ?>"><?php echo $row_m['name']; ?></option>
		 <?php
		 }
	  ?>
   </select><br /><br />
   <input type="submit" name="submit_art" value="Качи статията" />
</form>
<?php
include "../php/offer_article.php";
?>
<br /><br />
<?php
} else {
?>
<h3 class="form_h3">Избери самоучител, към който да предложиш статия</h3>
<div class="icons-panel">
<?php
$select_tut = mysql_query('SELECT * FROM tutorials');
while($row_tut = mysql_fetch_assoc($select_tut)){
   ?>
   <div class="icon">
   <?php
   echo '<a href="addarticle.php?name='.$row_tut['name'].'&amp;check=check"><img src="../img/tut.png" height="80px" width="80px" alt="add" class="pic"/>';
   echo '</a><br />';
   echo $row_tut['name'];
   ?>
   </div>
   <?php
}
?>
</div>
<?php } ?>
</div>